<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		 
		<script src="https://cdn.bootcss.com/vue/2.5.16/vue.min.js"></script>
		<!-- <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> -->
	</head>
	<body>
		<div id="root">
			<div>
				<input v-model="inputvelue"/>
				<button @Click="handleClick">提交</button>
			</div>
			<ul>
				<li v-for="(item,index) of list ":key="index" :content="item">			
				</li>
			</ul>
		</div>
		<script>
			Vue.component('todo-item',{
				props:['content'],
				template:'<li> {{ content }} </li>'
			})
			new Vue({
				el:"#root",
				data:{
					inputvelue:"hello",
					list:[]					
				},
				methods:{
					handleClick:function(){
						this.list.push(this.inputvelue)
						console.log(this.list)
					}
				}
			})
		</script>
	</body>
</html>
